import { http } from "@/utils/http";
import { baseUrlApi } from "@/api/utils";

type Result = {
  ok: boolean;
  msg: string;
  code: number;
  time: number;
  [key: string]: any;
};
/** 系统管理-用户管理-根据userId，获取对应角色id列表（userId：用户id） */
export const getRoleIds = (data?: object) => {
  return http.request<Result>("post", "/list-role-ids", { data });
};

/** 删除菜单*/
export const deleteMenu = (data?: object) => {
  return http.request<Result>("post", baseUrlApi("sys/deleteMenu"), { data });
};
/** 删除部门*/
export const deleteDept = (data?: object) => {
  return http.request<Result>("post", baseUrlApi("sys/deleteDept"), { data });
};
/** 保存管理员*/
export const saveAdmin = (data?: object) => {
  return http.request<Result>("post", baseUrlApi("sys/saveAdmin"), { data });
};
